<template>
  <div class="main">
    <div class="header">
      <div class="epName">
        {{ info.land_name }}
        <span class="goBack" @click="$router.go(-1)">返回</span>
      </div>
      <ul class="epClassify">
        <li>
          <p>地块编码：</p>
          <p>{{ info.land_code }}</p>
        </li>
        <li>
          <p>所属县区：</p>
          <p>{{ info.district_name }}</p>
        </li>
        <li>
          <p>用地性质：</p>
          <p>{{ info.land_nature }}</p>
        </li>
        <li>
          <p>总用地面积（公顷）</p>
          <p>{{ info.total_area }}</p>
        </li>
        <li>
          <p>详细地址：</p>
          <p>{{ info.detail_address }}</p>
        </li>
      </ul>
    </div>
    <div class="main_body">
      <div class="main-body-area">
        <div class="header_title"></div>
        <div class="table_one">
          <table border="1" padding="0">
            <tr>
              <td class="center-title">土地图片</td>
            </tr>
            <tr>
              <td class="img" rowspan="5">
                <el-image
                  v-if="info.price_url"
                  :src="info.price_url"
                  :preview-src-list="[info.price_url]"
                >
                </el-image>
              </td>
            </tr>
          </table>
        </div>
        <div class="height_box"></div>
      </div>
    </div>
  </div>
</template>
<script>
import { CheckDetail } from "@api/resources";
export default {
  data() {
    return {
      activeName: "businessInformation",
      activeMenu: "",
      info: {},
    };
  },
  mounted() {
    let id = this.$route.params.id;
    this.getDetail(id);
  },
  methods: {
    async getDetail(id) {
      let res = await CheckDetail({ id, carrier_type: 2 });
      if (res.data.length > 0) {
        res.data[0].price_url = res.data[0].price_url[0] ? res.data[0].price_url[0].url : "";
        this.info = res.data[0];
      } else {
        this.$message.error(res.msg);
      }
    },
  },
};
</script>
<style lang="less" scoped>
.main {
  width: 100%;
  height: 100%;
  background: #fff;
  text-align: left;
  .header {
    box-sizing: border-box;
    width: 100%;
    height: 260px;
    background: url("~@img/details/bg-img-land.png") no-repeat center;
    padding: 0 210px;
  }
  .main_body {
    width: 100%;
    height: calc(100% - 260px);
    overflow-y: auto;

    .main-body-area {
      margin: 0 auto;
      max-width: 1500px;
      height: 100%;
    }
  }
}

.epName {
  padding-top: 40px;
  font-size: 40px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #ffffff;
  line-height: 52px;
  span {
    margin-left: 30px;
    display: inline-block;
    width: 70px;
    height: 30px;
    line-height: 30px;
    background: #f89718;
    opacity: 0.8;
    border-radius: 4px;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
  }
  .goBack {
    margin-top: 7px;
    float: right;
    width: 100px;
    height: 38px;
    line-height: 38px;
    background: #5889dc;
    font-weight: 400;
    opacity: 1;
  }
}
.epClassify {
  display: flex;
  justify-content: flex-start;

  li {
    flex: auto;
    padding-left: 60px;
    margin-top: 30px;
    position: relative;
    cursor: pointer;
    &::before {
      position: absolute;
      top: 50%;
      left: 0;
      margin-top: -20px;
      display: block;
      content: "";
      width: 1px;
      height: 40px;
      background: #ffffff;
      opacity: 0.5;
    }
    &:first-of-type {
      padding-left: 0;
      &::before {
        opacity: 0;
      }
    }
    p {
      font-size: 20px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #ffffff;
      line-height: 56px;
      opacity: 0.6;
      white-space: nowrap;
      &:last-child {
        font-size: 22px;
        opacity: 0.9;
      }
    }
  }
}
.header_title {
  padding-top: 30px;
  margin-bottom: 20px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #333333;
}
table {
  width: 100%;
  border-color: #ddd;
  tr {
    td {
      padding: 0 20px;
      height: 46px;
      line-height: 46px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #333333;
    }
  }
  tr.row_header {
    td {
      background: #f7faff;
    }
  }
  tr.row_item {
    td {
      background: #fff;
    }
  }
}
.table_one table {
  border-color: #ddd;
  tr {
    td {
      padding: 0 20px;
      height: 46px;
      line-height: 46px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #333333;
    }
    td:nth-of-type(odd) {
      width: 100px;
      background: #ecf6ff;
    }
    td:nth-of-type(even) {
      width: 280px;
    }
    .detail {
      padding: 15px 20px;
      line-height: 22px;
    }
  }
}

.table_one table tr td.img {
  background: #fff;
  text-align: center;
  margin-top: 10px;
}
.center-title {
  text-align: center;
}
/deep/ .img .el-image {
  margin-top: 20px;
  width: 700px;
}
.map {
  margin-top: 30px;
  height: 90%;
  background: #e6e7e7;
  box-shadow: 0px 0px 9px 0px rgba(189, 189, 189, 0.67);
  border-radius: 10px;
}
.bm-view {
  width: 100%;
  height: 100%;
}
// 选项卡样式修改
/deep/ .el-tabs__nav-scroll {
  padding-left: 210px;
}
/deep/.el-tabs__item {
  padding: 0 60px 0 0;
  font-size: 20px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #333333;
  height: 60px;
  line-height: 60px;
}
/deep/.el-tabs__item.is-active {
  font-weight: bold;
  color: #0043b3;
}
/deep/.el-tabs--top .el-tabs__item.is-top:nth-child(2) {
  padding-left: 0px;
}
/deep/.el-tabs__active-bar {
  height: 4px;
  background: #0043b3;
}
/deep/ .el-tabs__nav-wrap {
  box-shadow: 0px 2px 6px 0px rgba(4, 0, 0, 0.1);
}
/deep/ .el-tabs__nav-wrap::after {
  height: 0;
}
/deep/.el-tabs__header {
  margin: 0;
}
/deep/ .el-tab-pane {
  width: 100%;
  height: 100%;
}
/deep/.el-tabs {
  height: 100%;
  .el-tabs__content {
    box-sizing: border-box;
    height: calc(100% - 60px);
    padding: 0px 240px 30px;
    overflow-y: auto;
    scrollbar-color: #767ffe #e9f3ff; //滚动条轨道颜色   滚动条滑块的颜色
    scrollbar-width: 6px;
    scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失
    &::-webkit-scrollbar {
      /*滚动条整体样式*/
      width: 10px; /*高宽分别对应横竖滚动条的尺寸*/
      height: 10px;
    }
    &::-webkit-scrollbar-thumb {
      /*滚动条里面小方块*/
      border-radius: 10px;
      background: linear-gradient(0deg, #767ffe, #79aefe);
    }
    &::-webkit-scrollbar-track {
      /*滚动条里面轨道*/
      background: #e9f3ff;
      border-radius: 10px;
    }
  }
}
/deep/ .rel-node-checked {
  box-shadow: 0px 0px 10px #2f48c8;
  animation: none;
}
/deep/ .rel-node-shape-0:hover {
  box-shadow: 0px 0px 10px #2f48c8;
}
/deep/ .rel-node-peel:hover .rel-node {
  box-shadow: 0px 0px 10px #2f48c8;
}

.main .header {
  padding: 0 210px;
}
.height_box {
  height: 30px;
}
@media screen and (min-width: 1366px) and (max-width: 1600px) {
  .main .header {
    padding: 0 20px;
  }
  /deep/ .el-tabs .el-tabs__content {
    padding: 0px 200px 30px;
  }
}
@media only screen and (width: 1366px) {
  .main .header {
    padding: 0 20px;
  }
  /deep/ .el-tabs .el-tabs__content {
    padding: 0px 200px 30px;
  }
}
@media screen and (max-width: 1200px) {
  .main .header {
    padding: 0 20px;
  }
  .epClassify li p {
    font-size: 16px;
  }
  .epClassify li p:last-child {
    font-size: 18px;
  }
  .epClassify li {
    padding: 0 30px;
  }
  /deep/ .el-tabs__nav-scroll {
    padding-left: 30px;
  }
  /deep/ .el-tabs .el-tabs__content {
    padding: 0 30px 30px;
  }
}
/*
  *常用电脑尺寸  1680 * 900
  *              1536 * 864
  *              1440 * 900
  *ipad pro      1366 * 1024
  *ipad mini     1024 * 768
  *ipad          1024 * 768
 */
/*分辨率低于1680，采用下面的样式*/
@media screen and (max-device-width: 1680px) {
}
/*分辨率低于1536，采用下面的样式*/
@media screen and (max-device-width: 1536px) {
  .main .main_body .main-body-area {
    max-width: 1400px;
  }
}
/*分辨率低于1440，采用下面的样式*/
@media screen and (max-device-width: 1440px) {
  .main .main_body .main-body-area {
    max-width: 1366px;
  }
}
/*分辨率低于1366，采用下面的样式*/
@media screen and (max-device-width: 1366px) {
  .main .main_body .main-body-area {
    max-width: 1180px;
  }
}
/*分辨率低于1180，采用下面的样式*/
@media screen and (max-device-width: 1180px) {
  .main .main_body .main-body-area {
    max-width: 1000px;
  }
}
/*分辨率低于1024，采用下面的样式*/
@media screen and (max-device-width: 1024px) {
}
</style>
